﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CALIB_ZB_DATA_LIST_VIEW.aspx.cs" Inherits="IYAKASAPortal.Standard.CALIB_ZB_DATA_LIST_VIEW" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>成都弥荣科技发展有限公司--自标数据查询</title>
    <link rel="stylesheet" href="../support/tfNiceTable/tfNiceTable.css" />
    <style type="text/css">
        body {
            overflow-y: scroll;
        }
    </style>
    <script type="text/javascript" src="../support/tfNiceTable/tfNiceTable.js"></script>
<script type="text/javascript" src="../script/jquery-3.2.1.min.js"></script>
    <script type="text/javascript">
        function doAjaxShow() {
            document.getElementById("divNiceTableMessage").style.left = $(window).width / 2;// window.parent.document.getElementById("mainContentFrame").scrollWidth/2-200;
            document.getElementById("divNiceTableMessage").style.top = $(window).height / 2;//window.parent.document.getElementById("mainContentFrame").scrollHeight/2-15;

            document.getElementById("divNiceTableMessage").style.display = "block";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <!--标记选中行的项目名称和线号-->
                <input type="hidden" id="txtUniqueKey" name="txtUniqueKey" value="" />
                 <input type="hidden" id="txtJCXH" name="JCXH" value="" />
                 <input type="hidden" id="txtDevCalibName" name="DevCalibName" value="" />
                <input type="hidden" id="txtDevName" name="DevName" value="" />
                 <input type="hidden" id="txtBDRQ" name="BDRQ" value="" />

                <div id="divNiceTableMessage" class="tfNiceTableMessage" style="display: none;">正在处理...</div>
                <table border="0" width="100%" cellpadding="0" cellspacing="0" style="height: 25px;">
                    <tr>
                        
                        <td class="main_title_left"></td>
                        <td class="main_title_center">&nbsp;<a onclick="BackFun()"><-返回</a></td>
                        <td class="main_title_right"></td>
                    </tr>
                </table>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" class="mainWidth">
                    <tr>
                        <td>
                            <table class="table_without_border">
                                <tr>
                                   <td align="right">
                                          <asp:Button ID="btnBrowse" runat="server" Text="" CssClass="btnBrowseEnabled" OnClientClick="doAjaxShow();" OnClick="btnBrowse_Click"  />
                                   </td>
                                </tr>

                            </table>
                            <table border="1" cellspacing="0" cellpadding="3" class="tfNiceTable">
                                <thead>
                                    <tr >  
                                        <td style="width:20%" align="center">线号</td>                                 
                                        <td style="width:20%" align="center">设备名称</td>
                                        <td style="width:20%" align="center">项目名称</td>
                                        <td style="width:20%" align="center">标定日期</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="rptList" runat="server">
                                        <ItemTemplate>
                                            <tr style="cursor:pointer;" onmouseover="doMouseOver(this);" onmouseout="doMouseOut(this);" onclick="MarkSelectRow(this,'<%# DataBinder.Eval(Container.DataItem, "JCXH")%>','<%# DataBinder.Eval(Container.DataItem, "DevCalibName")%>','<%# DataBinder.Eval(Container.DataItem,"BDRQ") %>','<%# DataBinder.Eval(Container.DataItem, "DevName")%>');" ondblclick="OpenDataView('<%# DataBinder.Eval(Container.DataItem,"DevCalibName") %>','<%# DataBinder.Eval(Container.DataItem,"JCXH") %>','<%# DataBinder.Eval(Container.DataItem,"BDRQ") %>')">
                                           <td align="center"><%# DataBinder.Eval(Container.DataItem, "JCXH")%></td>
                                           <td align="center"><%# DataBinder.Eval(Container.DataItem, "DevName")%></td>
                                           <td align="center"><%# DataBinder.Eval(Container.DataItem, "DevCalibName")%></td>
                                           <td align="center"><%# DataBinder.Eval(Container.DataItem, "BDRQ")%></td>                                    
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                            <br />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
<script type="text/javascript" src="../support/jedate/jedate.min.js"></script>
<script type="text/javascript" src="../script/jquery.validate.min.js"></script>

<script type="text/javascript">

    var r_obj = null;
    function MarkSelectRow(obj, JCXH, DevCalibName, BDRQ, DevName) {
        obj.style.background = '#f1f1cd';
        console.log(JCXH);
        console.log(DevCalibName);
        try {
            if ((r_obj != null) && (r_obj != obj)) {
                r_obj.style.background = '#ffffff';
            }
        }
        catch (e) {
        }

        r_obj = obj;
        r_obj.style.background = '#f1f1cd';
        $("#txtJCXH").val(JCXH);
        $("#txtDevCalibName").val(DevCalibName);
        $("#txtBDRQ").val(BDRQ);
        $("#txtDevName").val(DevName);
        console.log(BDRQ);
    }
    function OpenDataView(devCName, JCXH) {
        $('#btnBrowse').click();
    }

    function BackFun()
    {
        history.back(-1);
    }


</script>

